package outputDocument;

import model.Blocks;
import model.MyRect;
import model.TextBlock;
import org.junit.Test;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;


public class test {
    @Test
    public void outputDocx() throws IOException {
//        DOCXWriter writer = new DOCXWriter();
//        writer.createDOCX(new File("src/test/TessTest/text.docx"));

    }
    @Test
    public void doCo(){
        List<Integer> list = new ArrayList();
        list.add(3);
        list.add(4);
        list.add(5);
        list.add(9);
        list.add(10);
        list.add(11);
        list.add(14);
        list.add(15);
        list.add(16);
        list.add(17);
        list.add(18);
        list.add(19);


    }
    @Test
    public void test1() throws IOException {
        TextBlock textBlock1 = new TextBlock(1, new MyRect(100, 60, 100, 785));
        textBlock1.setContent("英");
        TextBlock textBlock2 = new TextBlock(1, new MyRect(100, 60, 100, 785));
        textBlock2.setContent("语");
//20, 130, 88, 800
        TextBlock textBlock3 = new TextBlock(1, new MyRect(20, 130, 88, 800));
        textBlock3.setContent("标");
        TextBlock textBlock4 = new TextBlock(1, new MyRect(20, 130, 88, 800));
        textBlock4.setContent("题");
        TextBlock textBlock5 = new TextBlock(1, new MyRect(220, 156, 88, 800));
        textBlock5.setContent("这");
        TextBlock textBlock6 = new TextBlock(1, new MyRect(20, 156, 88, 800));
        textBlock6.setContent("是");
        TextBlock textBlock7 = new TextBlock(1, new MyRect(20, 156, 88, 800));
        textBlock7.setContent("一");
        TextBlock textBlock8 = new TextBlock(1, new MyRect(20, 156, 88, 800));
        textBlock8.setContent("次");
        TextBlock textBlock9 = new TextBlock(1, new MyRect(20, 156, 88, 800));
        textBlock9.setContent("华");
        TextBlock textBlock10 = new TextBlock(1, new MyRect(20, 156, 88, 800));
        textBlock10.setContent("丽");
        TextBlock textBlock11 = new TextBlock(1, new MyRect(30, 156, 88, 800));
        textBlock11.setContent("的");
        TextBlock textBlock12 = new TextBlock(1, new MyRect(74, 156, 88, 800));
        textBlock12.setContent("测");
        TextBlock textBlock13 = new TextBlock(1, new MyRect(74, 156, 88, 800));
        textBlock13.setContent("试");
        TextBlock textBlock14 = new TextBlock(1, new MyRect(74, 156, 88, 800));
        textBlock14.setContent("。");
        TextBlock textBlock15 = new TextBlock(1, new MyRect(20, 130, 88, 800));
        textBlock15.setContent("标");
        TextBlock textBlock16 = new TextBlock(1, new MyRect(20, 130, 88, 800));
        textBlock16.setContent("题");
        TextBlock textBlock17 = new TextBlock(1, new MyRect(20, 156, 88, 800));
        textBlock17.setContent("是");
        TextBlock textBlock18 = new TextBlock(1, new MyRect(20, 156, 88, 800));
        textBlock18.setContent("一");
//        TextBlock textBlock8 = new TextBlock(1, new MyRect(20, 156, 88, 800));
//        textBlock8.setContent("次");
//        TextBlock textBlock9 = new TextBlock(1, new MyRect(20, 156, 88, 800));
//        textBlock9.setContent("华");
//        TextBlock textBlock10 = new TextBlock(1, new MyRect(20, 156, 88, 800));
//        textBlock10.setContent("丽");
//        TextBlock textBlock11 = new TextBlock(1, new MyRect(30, 156, 88, 800));
//        textBlock11.setContent("的");
//        TextBlock textBlock12 = new TextBlock(1, new MyRect(74, 156, 88, 800));
//        textBlock12.setContent("测");
//        TextBlock textBlock13 = new TextBlock(1, new MyRect(74, 156, 88, 800));
//        textBlock13.setContent("试");
//        TextBlock textBlock14 = new TextBlock(1, new MyRect(74, 156, 88, 800));
//        textBlock14.setContent("。");
        Blocks blocks = new Blocks();
        blocks.addTextBlock(textBlock1);
        blocks.addTextBlock(textBlock2);
        blocks.addTextBlock(textBlock3);
        blocks.addTextBlock(textBlock4);
        blocks.addTextBlock(textBlock5);
        blocks.addTextBlock(textBlock6);
        blocks.addTextBlock(textBlock7);
        blocks.addTextBlock(textBlock8);
        blocks.addTextBlock(textBlock9);
        blocks.addTextBlock(textBlock10);
        blocks.addTextBlock(textBlock11);
        blocks.addTextBlock(textBlock12);
        blocks.addTextBlock(textBlock13);
        blocks.addTextBlock(textBlock14);
        blocks.addTextBlock(textBlock15);
        blocks.addTextBlock(textBlock16);
        blocks.addTextBlock(textBlock17);
        blocks.addTextBlock(textBlock18);

//        Processor processor = new Processor(blocks);
//        DOCXWriter writer = new DOCXWriter(processor.distrbuteContent());
//        writer.createDOCX(new File("src/test/TessTest/text.docx"));
    }
    @Test
    public void some(){
      int i=0;
      int j=0;
      i++;
      j=i;
      System.out.println(i+"  "+j);

    }
}
